# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.shortcuts import render
from django.views.generic import TemplateView


# Create your views here.
class IndexTemplateView(TemplateView):
    """数据统计的过滤器页面，生成过滤器，及任务列表"""
    template_name = 'business/news.html'

    # @method_decorator(login_required)
    def dispatch(self, *args, **kwargs):
        return super(IndexTemplateView, self).dispatch(*args, **kwargs)

    def get_context_data(self, **kwargs):
        context = super(IndexTemplateView, self).get_context_data(**kwargs)
        # project_list = list(Project.objects.all().values_list('pk', flat=True))
        project_list = ['a', 'b', 'c']
        context['title'] = 'Statistics'
        context['project_list'] = project_list
        return context


class FontListTemplateView(TemplateView):
    template_name = 'business/font-list.html'


class ImageListTemplateView(TemplateView):
    template_name = 'business/images-list.html'


class NewsTemplateView(TemplateView):
    template_name = 'business/news.html'


class NewsListTemplateView(TemplateView):
    template_name = 'business/news-list.html'


class FormAmazeuiTemplateView(TemplateView):
    template_name = 'business/form-amazeui.html'


class FormLineTemplateView(TemplateView):
    template_name = 'business/form-line.html'
